Fix Baidu search verification failures and hangs#1006
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the documentation in AGENTS.md to move Baidu from the default verification checks to the optional engines list, as it may be blocked by regional or anti-bot measures. There are no review comments, so I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
PR Summary by QodoDisable Baidu live URL in config verifier to avoid flaky CI hangs
AI Description
Diagram
High-Level Assessment
Files changed (2)
|
📝 WalkthroughWalkthroughThe search verification script now uses site-specific fetch implementations, request timeouts, same-origin redirect checks for Baidu, non-200 response rejection, and coded error reporting. The GitHub Actions verification job has a five-minute execution limit. ChangesSearch verification
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant VerifyConfigs
participant Verifier
participant SearchEngine
VerifyConfigs->>Verifier: Start verification job
Verifier->>SearchEngine: Fetch page with timeout
SearchEngine-->>Verifier: Return redirect or HTTP response
Verifier->>Verifier: Validate origin, status, and response text
Verifier-->>VerifyConfigs: Report result and error code
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request updates the AGENTS.md documentation to move Baidu from the default verification checks list to the optional engines list, as it may be blocked by regional or anti-bot measures. There are no review comments, and I have no feedback to provide.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reconciled Prior Findings (incremental)
Previous Review Summaries (2 snapshots, latest commit 9129b17)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 9129b17)Status: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Previous review (commit 7fbd1df)Status: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by hy3:free · Input: 29.2K · Output: 4K · Cached: 233.6K |
Code Review by Qodo
1.
|
7fbd1df to
9129b17
Compare
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9129b17b25
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
This PR improves the reliability and diagnosability of the CI search-engine configuration verifier by mixing HTTP clients per site (to avoid known connectivity issues), adding per-request timeouts, and tightening failure reporting, while also bounding the overall workflow runtime.
Changes:
- Add a 5-minute timeout to the
verify-configsworkflow job. - Use Node’s built-in
fetchspecifically for Baidu requests while keepingnode-fetchfor other engines. - Add a 30-second per-request timeout, enforce HTTP 200 responses, and improve error/redirect reporting.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/verify-configs.yml |
Adds job timeout to prevent the scheduled verifier from hanging indefinitely. |
.github/workflows/scripts/verify-search-engine-configs.mjs |
Introduces mixed fetch strategy (Baidu via built-in fetch), per-request timeouts, and improved HTTP/redirect/error reporting for verification runs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Keep node-fetch for search engines that reject Node's global fetch, but use the global fetch implementation for Baidu, where node-fetch connections reset or hang. Bound each request and the workflow job, require HTTP 200 responses, and include the site and URL in errors. This restores Baidu coverage without allowing a live probe to consume the six-hour default.
9129b17 to
2c3a743
Compare
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
Summary
node-fetchpath for Bing, Yahoo, and Naver, while using Node built-infetchfor Baidu to avoid the reproducible connection resets and hangsfetchtonode-fetchheader objectsValidation
npm run prettynpm run lintnpm test(704 passed)npm run buildnpm run verify(Bing, Yahoo, Baidu, and Naver desktop/mobile checks passed)node --check .github/workflows/scripts/verify-search-engine-configs.mjsgit diff --check origin/master..HEADValidation skipped: manual browser smoke tests; this change only affects the CI verifier and workflow, not extension runtime behavior.
GitHub-hosted
verify-configsexecution remains unverified because Actions are disabled on the fork; queued fork runs are not treated as evidence.